PreviousNextTracker indexSee it online !

(146/308) 1268 - InfoViewer doesn't handle hyperlinks correctly

When viewing a java API page in InfoViewer (such as jEdit's api docs), clicking on a link that jumps to a point on that page (e.g. clicking on a method or a field) often causes the page to go back up to the top, or some other undesired destination. Clicking in the address bar and hitting enter causes the page to go to the correct location, but clicking on links more often than not fails.

Submitted kog13 - 2010-01-06 21:26:52 Assigned
Priority 5 Labels
Status open Group None
Resolution None

Comments

2010-01-06 22:20:25
ezust

I think the infoviewer does not handle the first or second hyperlink clicks correctly, but after the 2nd time, it usually does.

2010-01-06 22:28:10
kog13

Any idea what causes it?

2010-01-07 00:13:06
ezust

It might be a bug I introduced while adding the "back" and "forward" buttons.
In fact. I haven't looked at the infoviewer code in a while,

2010-01-08 23:59:39
ezust

Playing some more with it, what it seems to be is that the first time you click on a hyperlink that goes to a new file, it always fails the first time, and works the second time.

It seems to me that infoviewer requests that files be loaded but doesn't wait long enough before making an attempt to change the position to what the URL refers to.
So you have to make repeated attempts to click on any hyperlink that goes to a different file.
Does that seem consistent with your observation?

2010-01-08 23:59:41
ezust

- **summary**: InfoViewer doesn't handle API links correctly --> InfoViewer doesn't handle hyperlinks correctly

2010-01-09 00:10:54
kog13

Not exactly, but it could be close. The problem I noticed isn't switching between pages, but jumping to a location further down on the same page. It may be a reloading issue, as it does appear to flicker the first time the link is clicked, but I can't confirm that readily.

2011-10-27 17:52:48
ezust

It has nothing to do with whether the page is already loaded.
I can reproduce this issue by toggling between two hyperlinks in the same HTML file for any link that has a #something in the URL.

For me it requires 2 clicks always when I am selecting treenodes with a # in the URL. The first click brings me to the top of the file, the second brings me to the correct location in the file.

2012-01-16 06:31:53
*anonymous

- **assigned_to**: nobody --> shlomy

2012-01-18 04:11:39
*anonymous

Alan is right. The problem happens because the document is loaded asynchronously, and the GUI is not updated when the document is done loading. Forcing synchronous loading fixes the problem. However I don't know yet how to do this the right way, I am checking it.

2012-01-19 16:49:15
ezust

Why the heck does this problem exist in InfoViewer but not jEdit's own built-in helpviewer??

2012-02-29 20:46:24
*anonymous

- **assigned_to**: shlomy --> nobody